#ifndef __WINDOW_HPP__
#define __WINDOW_HPP__

#include <bin.hpp>

namespace gtkhpp {

class Window : public Bin{
public:
	enum WindowType {
		TOPLEVEL = GTK_WINDOW_TOPLEVEL,
		POPUP = GTK_WINDOW_POPUP
	};
	Window(WindowType type);

	void set_decorated(gboolean setting);
	void set_title(const char *title);
	void set_default_size(gint width, gint height);
	void fullscreen();
        void show();
protected:
        Window(Object *parent) : Bin(parent) {}
};

inline Window::Window(WindowType type)
        : Bin(NULL)
{
	obj = G_OBJECT(gtk_window_new((GtkWindowType)type));
}

inline void Window::set_title(const char *title)
{
	gtk_window_set_title(GTK_WINDOW(obj), title);
}

inline void Window::fullscreen()
{
	gtk_window_fullscreen(GTK_WINDOW(obj));
}

inline void Window::show()
{
	gtk_widget_show_all(GTK_WIDGET(obj));
}

inline void Window::set_decorated(int setting)
{
	gtk_window_set_decorated(GTK_WINDOW(obj), setting);
}

inline void Window::set_default_size(int width, int height)
{
	gtk_window_set_default_size(GTK_WINDOW(obj), width, height);
}

} // namespace gtkhpp

#endif /* end of include guard */
